package com.bee.auth.manager.impl;

import com.bee.auth.manager.RoleResourceManager;
import com.bee.user.client.RoleResourceClient;
import com.bee.user.client.dto.ResourceDTO;
import com.bee.user.client.dto.RoleDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Damin.yang
 * @date 2019/08/23 16:48
 */
@Service
public class RoleResourceManagerImpl implements RoleResourceManager {

    @Autowired
    private RoleResourceClient roleResourceClient;


    @Override
    public List<ResourceDTO> queryByRoleId(Long roleId) {
        return roleResourceClient.queryByRoleId(roleId);
    }

    @Override
    public List<RoleDTO> queryEnableRoles() {
        return roleResourceClient.queryEnableRoles();
    }
}
